package com.open.capacity.notice.enums;

import java.util.Map;

import com.baomidou.mybatisplus.annotation.EnumValue;

import lombok.Getter;

@Getter
public enum SendMessageJobStatus implements BaseEnum<SendMessageJobStatus> {

	NULL(0, "未知"),CREATED(1, "已创建"), TASK_CREATED(2, "已拆分"), CANCELLED(10, "已取消"), SUCCESS(3, "成功"), FAILURE(4, "失败");
	@EnumValue
	private Integer code;
	private String name;

	SendMessageJobStatus(int code, String name) {
		this.code = code;
		this.name = name;
	}

	
	public static SendMessageJobStatus of(Integer code) {
		return BaseEnum.parseByCode(SendMessageJobStatus.class, code);
	}

	public static Map<Integer, String> toMap() {
		return BaseEnum.toMap(SendMessageJobStatus.class);
	}
	
}
